From 46780098002167070c665f03f1a8ed76d1e1c55f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 7 Aug 2025 13:27:50 +0200 Subject: [PATCH] hotplug: ensure that the button subsystem is always registered Its events are handled separately, so there usually is no hotplug.d directory for it. Signed-off-by: Felix Fietkau --- hotplug-dispatch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hotplug-dispatch.c b/hotplug-dispatch.c index 6e99942..fd87a09 100644 --- a/hotplug-dispatch.c +++ b/hotplug-dispatch.c @@ -375,6 +375,9 @@ static void remove_subsystem(char *name) { struct hotplug_subsys *h; + if (!strcmp(name, "button")) + return; + h = avl_find_element(&subsystems, name, h, node); if (!h) return; @@ -388,6 +391,8 @@ static int init_subsystems(void) DIR *dir; struct dirent *dirent; + add_subsystem("button"); + dir = opendir(HOTPLUG_BASEDIR); if (dir == NULL) return ENOENT; -- 2.30.2